<%-- 
    Document   : spdcf_all
    Created on : Jan 5, 2009, 2:52:33 PM
    Author     : City_Z
    <a href="spdcf_itemEdit.do?kode=<c:out value="${item.produk.kode}"/>">Edit</a>
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<table>
    <tr>
        <td class="menucon">
            <html:link action="/spdcf_main.do" title="Go to main.">SPDCF</html:link>
        </td>
    </tr>
</table>

<html:form action="/spdcf_saveAll">     
<table>
    <tr>
        <td>No Quotation</td>
        <td>:</td>
        <td><c:out value="${inquery.noQuotation}"/></td>
    </tr>

<tr>
    <td>BusinessPartner</td>
    <td>:</td>
    <td>
        <html:select property="idBusinessPartner">
            <html:optionsCollection name="customers" value="id" label="nama"/>
        </html:select>
    </td>
</tr>       
<tr>
<td>Alamat Pengiriman</td> 
<td>:</td>
<td><input type="text" name="alamatPengiriman"/></td>
<tr>
</table>
<table border="0">
    <tr class="table_header">
        <th>No</th>
        <th>Code</th>
        <th>Description</th>
        <th>Weight</th>
        <th>Quantity</th>
        <th>Price HPP</th>
        <th>Margin Keuangan(%)</th>
        <th>Note</th>
        <th>Action</th>
    </tr>
    <c:set var="x" value="0"/>
    <c:set var="totalPriceHpp" value="0"/>
    <c:set var="totalMarginKeuangan" value="0"/>
        <c:forEach items="${listSpdcfItem}" var="item">
            <tr>
                <td>${x+1}.</td>
                <td>${item.produk.kode}</td>
                <td>${item.produk.nama}</td>
                <td align="right">${item.produk.weight} ${item.produk.hargaHpp.unit.nama}</td>
                <td align="right">${item.jumlah}</td>
                <td align="right">${item.priceHpp}</td>
                <td align="right">${item.marginKeuangan}</td>
                <td>${item.note}</td>                        
                <td><html:link action="/spdcf_itemEdit" paramName="item" paramProperty="produk.kode" paramId="kode">Edit</html:link></td>
            </tr>
            <c:set var="x" value="${x+1}"/>
            <c:set var="totalPriceHpp" value="${totalPriceHpp+item.priceHpp}"/>
            <c:set var="totalMarginKeuangan" value="${totalMarginKeuangan+item.marginKeuangan}"/>
        </c:forEach>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td align="right"><c:out value="${totalPriceHpp}"/></td>
            <td align="right"><c:out value="${totalMarginKeuangan}"/></td>
        </tr>
        <tr class="table_footer">
            <td colspan="10">PT. Dhemar Nusantara - PT. Rahmi Ida Nusantara</td>
        </tr>
</table>    
<table>
    <tr>
        <td>Note</td>
        <td>:</td>
        <td><html:text property="note"/></td>                
    </tr>
    <tr>
        <td>Transportation</td>
        <td>:</td>
        <td><html:text property="transportation"/></td>                
    </tr>
    <tr>
        <td>PPN</td>
        <td>:</td>
        <td><html:text property="ppn"/> %</td>
    </tr>
    <tr>
        <td>Validity Price</td>
        <td>:</td>
        <td><html:text property="validityPrice"/></td>                
    </tr>    
    <tr>
        <td>Validity LE</td>
        <td>:</td>
        <td><html:text property="validityStockLE"/></td>
    </tr>
    <tr>
        <td>Production Time</td>
        <td>:</td>
        <td><input a type="radio" name="productionTime" value="0">days after receive this PO in normal condition + Agreement</input></td>
        <td></td>
    </tr>     
    <tr>
        <td></td>
        <td></td>
        <td><input type="radio" name="productionTime" value="1">days after PO on schedule was done + Agreement</input></td>
        <td>days : <input type="text" name="productionTimeDays" size="3"/></td>
    </tr>      
    <tr>
        <td>Production Condition</td>
        <td>:</td>
        <td><input type="radio" name="productionCondition" value="0">Ready Stock</input></td>                
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><input type="radio" name="productionCondition" value="1">On Schedule</input></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td> <input type="radio" name="productionCondition" value="2">Waiting List</input></td>
    </tr>
    <tr>
        <td>Finishing</td>
        <td>:</td>
        <td><input type="radio" name="finishingDays" value="0">Hot Dip Galvanized</input></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><input type="radio" name="finishingDays" value="1">Electro Galvanized</input></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><input type="radio" name="finishingDays" value="2">Power Coating</input> </td>
    </tr>
    <tr>
        <td>Delivery Mode</td>
        <td>:</td>
        <td><input type="radio" name="deliveryMode" value="0">Partial / Progress</input></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><input type="radio" name="deliveryMode" value="1">One delivery(100%)</input></td>
        <td>days : <input type="text" name="deliveryModeDesc" size="3"/></td>                
    </tr>
    <tr>
        <td>Delivery Time</td>
        <td>:</td>
        <td><input type="radio" name="deliveryTime" value="0">Partial / Progress</input></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><input type="radio" name="deliveryTime" value="1">One delivery(100%)</input></td>
        <td>days : <input type="text" name="deliveryTimeDays" size="3"/></td>                
    </tr>
    <tr>
        <td colspan="4"><html:submit value="Save Now"/></td>
    </tr>        
</table>
</html:form>
